package my.simpledebugger;

public class RunTester extends Thread {
	private Thread testee;
	private long delay=0;
	public RunTester(Thread testee){
		this.testee=testee;
		start();
	}
	public RunTester(Thread testee,long delay){
		this.testee=testee;
		this.delay=delay;
		start();
	}
	@Override
	public void run(){
		RunState result=new RunIt().go(testee, delay);
//		r.go(testee, delay);
		if(result instanceof RunSuccess){
			System.out.println("Execution Time : "+((RunSuccess)result));
		}
		else{
			System.out.println("Execution Aborted : " + ((RunFailure)result));
		}
	}
}
